<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">
	<ui:param name="topicRecViewBean" value="#{commonContentViewBean}" />
	<h:head>
		<h:outputStylesheet library="css" name="bbs.css" />
		<script language="javascript"
			src="#{request.contextPath}/resources/script/bbs.js"></script>
	</h:head>

	<p:panel header="回复信息" footer="欢迎阅读回复信息">
		<h:form id="#{topicRecViewBean.id}_form">
			<table class="table1">
				<tr>
					<td colspan="2" class="midTable1td1"><p:commandButton
						value="回复" image="ui-icon-disk" title="回复" type="button"
						onclick="openAddRec('#{topicRecViewBean.topicEntity.topictitle}','#{topicRecViewBean.topicEntity.topicuuid}','#{ty.topicId}');" />
					</td>
				</tr>
				<tr>
					<td colspan="2" class="midTable1td1" height="50">
					主题：#{topicRecViewBean.topicEntity.topictitle}</td>
				</tr>
				<tr height="250">
					<td class="midTable1td1" width="30%">
					<table>
									<tr>
										<td>账号：</td>
										<td>#{topicRecViewBean.user.username}</td>
									</tr>
									<tr>
										<td>类型：</td>
										<td>#{topicRecViewBean.user.usertype}</td>
									</tr>
									<tr>
										<td>警号：</td>
										<td>#{topicRecViewBean.user.usercode}</td>
									</tr>
								</table>
					</td>
					<td class="midTable1td1" width="70%">
					<table class="table2">
						<tr>
							<td>发表时间：#{topicRecViewBean.topicEntity.inputtime}</td>
							<td>来源：#{topicRecViewBean.topicEntity.inputpsn}</td>
							
						</tr>
						<tr>
							<td colspan="3">主题内容：</td>
						</tr>
						<tr>
							<td colspan="3"><h:outputText value="#{topicRecViewBean.topicEntity.topiccontent}"
								escape="false" /></td>
						</tr>
					</table>
					</td>
				</tr>
				<tr>
					<td colspan="2" class="midTable1td1"></td>
				</tr>
				<c:forEach var="rec" items="#{topicRecViewBean.topicResEntitys}">
					<tr>
						<td colspan="2" class="midTable1td1" height="30" align="right">
						<p:commandButton value="重写" image="ui-icon-disk" title="重写"
							type="button"
							onclick="editRec('#{topicRecViewBean.id}','#{rec.responseuuid}');" /> 
							<p:commandButton
							value="丢弃" image="ui-icon-trash"
							update="#{topicRecViewBean.id}_form" title="丢弃"
							actionListener="#{topicResAction.delete}">
							<h:inputHidden value="#{rec.responseuuid}" />
						</p:commandButton></td>
					</tr>
					<tr height="250">
						<td colspan="2">
						<table class="table2">
							<tr>
								<td class="midTable1td1" width="30%">
								<table>
									<tr>
										<td>账号：</td>
										<td>#{rec.user.username}</td>
									</tr>
									<tr>
										<td>类型：</td>
										<td>#{rec.user.usertype}</td>
									</tr>
									<tr>
										<td>警号：</td>
										<td>#{rec.user.usercode}</td>
									</tr>
								</table>
								</td>
								<td class="midTable1td1" width="70%">
								<table class="table2">
									<tr>
										<td>发表时间：#{rec.inputtime}</td>
										<td>来源：#{rec.responseip}</td>
									</tr>
									<tr>
										<td colspan="3">回复内容：</td>
									</tr>
									<tr>
										<td colspan="3"><h:outputText value="#{rec.responsecontent}"
											escape="false" /></td>
									</tr>
								</table>
								</td>
							</tr>
						</table>
						</td>
					</tr>
				</c:forEach>
			</table>

		</h:form>
	</p:panel>
</ui:composition>
